.class Lcom/waiqin365/lightapp/im/contactlist/v;
.super Ljava/lang/Thread;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/a/a/e;

.field final synthetic b:Lcom/waiqin365/lightapp/im/contactlist/u;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/contactlist/u;Lcom/waiqin365/lightapp/im/a/a/e;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->a:Lcom/waiqin365/lightapp/im/a/a/e;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 8

    invoke-super {p0}, Ljava/lang/Thread;->run()V

    :try_start_0
    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->groupManager()Lcom/hyphenate/chat/EMGroupManager;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->a:Lcom/waiqin365/lightapp/im/a/a/e;

    iget-object v1, v1, Lcom/waiqin365/lightapp/im/a/a/e;->d:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMGroupManager;->getGroupFromServer(Ljava/lang/String;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v2

    const/4 v0, 0x0

    move v1, v0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->g(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-ge v1, v0, :cond_1

    if-nez v1, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v3, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->g(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->b:Ljava/lang/String;

    invoke-static {v3, v0}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->b(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;Ljava/lang/String;)Ljava/lang/String;

    :goto_1
    add-int/lit8 v0, v1, 0x1

    move v1, v0

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v3, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v4, "\u3001"

    invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->g(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/kehu/share/a/c;

    iget-object v0, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->b:Ljava/lang/String;

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v3, v0}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->a(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;Ljava/lang/Object;)Ljava/lang/String;
    :try_end_0
    .catch Lcom/hyphenate/exceptions/HyphenateException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lcom/hyphenate/exceptions/HyphenateException;->printStackTrace()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    new-instance v1, Lcom/waiqin365/lightapp/im/contactlist/x;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/contactlist/x;-><init>(Lcom/waiqin365/lightapp/im/contactlist/v;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    :goto_2
    return-void

    :cond_1
    :try_start_1
    invoke-virtual {v2}, Lcom/hyphenate/chat/EMGroup;->getGroupId()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMGroup;->getOwner()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v3, v3, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    invoke-static {v1, v3}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    const v3, 0x7f08033e

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->l(Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    const v3, 0x7f08033f

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Lcom/hyphenate/chat/EMTextMessageBody;

    invoke-direct {v2, v1}, Lcom/hyphenate/chat/EMTextMessageBody;-><init>(Ljava/lang/String;)V

    sget-object v1, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    invoke-static {v1}, Lcom/hyphenate/chat/EMMessage;->createSendMessage(Lcom/hyphenate/chat/EMMessage$Type;)Lcom/hyphenate/chat/EMMessage;

    move-result-object v1

    sget-object v3, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    invoke-virtual {v1, v3}, Lcom/hyphenate/chat/EMMessage;->setChatType(Lcom/hyphenate/chat/EMMessage$ChatType;)V

    new-instance v3, Ljava/util/Date;

    invoke-direct {v3}, Ljava/util/Date;-><init>()V

    invoke-virtual {v3}, Ljava/util/Date;->getTime()J

    move-result-wide v4

    const-wide/16 v6, 0x64

    add-long/2addr v4, v6

    invoke-virtual {v1, v4, v5}, Lcom/hyphenate/chat/EMMessage;->setMsgTime(J)V

    const-string/jumbo v3, "is_notification"

    const/4 v4, 0x1

    invoke-virtual {v1, v3, v4}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Z)V

    invoke-virtual {v1, v2}, Lcom/hyphenate/chat/EMMessage;->addBody(Lcom/hyphenate/chat/EMMessageBody;)V

    invoke-virtual {v1, v0}, Lcom/hyphenate/chat/EMMessage;->setReceipt(Ljava/lang/String;)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/hyphenate/chat/EMChatManager;->sendMessage(Lcom/hyphenate/chat/EMMessage;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/contactlist/v;->b:Lcom/waiqin365/lightapp/im/contactlist/u;

    iget-object v1, v1, Lcom/waiqin365/lightapp/im/contactlist/u;->a:Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;

    new-instance v2, Lcom/waiqin365/lightapp/im/contactlist/w;

    invoke-direct {v2, p0, v0}, Lcom/waiqin365/lightapp/im/contactlist/w;-><init>(Lcom/waiqin365/lightapp/im/contactlist/v;Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/im/contactlist/GroupPickContactsListActivity;->runOnUiThread(Ljava/lang/Runnable;)V
    :try_end_1
    .catch Lcom/hyphenate/exceptions/HyphenateException; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_2
.end method
